#include <bits/stdc++.h>
using namespace std;
int n;

int main() {
    cin >> n;
    int n1 = 0;
    while (n != 0) {
        n1 = n1 * 10 + n % 10;
        n = n / 10;
    }
    cout << n1;
    return 0;
}